/* components */
import TaskReviewListComponents from '@src/modules/task/taskTypes/review/TaskReviewListComponents'
import FeedbackDialog from '@src/modules/task/view/components/TaskFeedback/FeedbackDialog.vue'
import ProposeApproveDialog from '@src/modules/task/view/components/ProposeApproveDialog.vue'
import sendSmsDlalog from './components/sendSmsDlalog.vue';
/* enum */
import StorageKeyEnum from '@model/enum/StorageKeyEnum'
/* entity */
import EsTask from '@model/entity/EsTask'
/* model */
import { getTaskReviewInitDataResult } from '@model/param/out/Task'
import Column from '@model/types/Column'
import { EvaluateValueEnum, ReviewTypeValueEnum, ReviewValueEnum, TaskType } from '@src/modules/task/taskTypes/review/TaskReviewListModel'
/* vue */
import { Ref } from 'vue-property-decorator'

class TaskReviewListData extends TaskReviewListComponents {
  // 工单回访评价信息弹窗组件
  @Ref() FeedBackDialogComponent!: FeedbackDialog
  // 工单审批弹窗
  @Ref() ProposeApproveDialogComponent!: ProposeApproveDialog
  // 工单发送短信弹窗
  @Ref() SendSmsDialogComponent!: sendSmsDlalog
  /* 高级搜索字段缓存数据 */
  public advancedSearchFieldStorageKey: StorageKeyEnum = StorageKeyEnum.TaskReviewListSearchFields
  /* 列表导出缓存 */
  public exportStorageKey: StorageKeyEnum = StorageKeyEnum.TaskReviewExport
  /* 列数据 */
  public columns: Column[] = this.getColumnFields(this) as Column[]
  /* 当前回访的工单数据 */
  public currentReviewTask: EsTask | Record<string, any> = {}
  /* 评价值 2： 全部 1: 已评价 0：未评价 */
  public evaluateValue: EvaluateValueEnum = EvaluateValueEnum.All
  /* 初始数据 */
  public initData: getTaskReviewInitDataResult = {
    taskTypeList: [],
    taskConfig: undefined,
    hasSub: false,
    reviewOn: true,
    autoReviewOn: true,
    evaluateConfig: undefined,
    receiptConfig: undefined,
    paymentConfig: undefined
  }
  /* 选择列 缓存键名 */
  public selectColumnStorageKey: StorageKeyEnum = StorageKeyEnum.TaskReviewTableColumnsManualNot
  /* pageSize 缓存键名 */
  public pageSizeStorageKey: StorageKeyEnum = StorageKeyEnum.TaskReviewPageSize
  /* 地图是否显示 */
  public mapShow: boolean = false
  /* 回访类型 1: 人工回访 2：自动回访 */
  public reviewType: ReviewTypeValueEnum = ReviewTypeValueEnum.Manual
  /* 回访值 2： 全部 1: 已回访 0：未回访 3：跟进中 */
  public reviewValue: ReviewValueEnum = ReviewValueEnum.UnReview
  public readonly: Boolean = false
  // 工单类型
  public taskType: TaskType = {
    id: '',
    name: ''
  }
  /* 缓存 */
  public satisfactionTips: string = 'REVIEW_SATISFACTION_TIPS';
  /* 是否显示引导 */
  public visibleGuide: boolean = false

  public currentEditIds: string[] = []
}

export default TaskReviewListData
